.PHONY: install test lint format publish clean

install:
	uv venv
	uv pip install .[dev]

test:
	uv run pytest -v -s tests

lint:
	uv run ruff check .

format:
	uv run ruff format .

build:
	uv run python -m build

clean:
	rm -rf build/
	rm -rf dist/
	rm -rf *.egg-info/
	rm -rf .pytest_cache/
	rm -rf .ruff_cache/
	rm -rf .coverage
	rm -rf htmlcov/
	find . -type d -name "__pycache__" -exec rm -rf {} +
	find . -type d -name "*.pyc" -exec rm -rf {} +

publish: clean build
	uv run python -m twine upload dist/*
